package java基础;

import java.util.Arrays;
import java.util.List;

public class ArraysAsList {
    public static void main(String[] args) {
      List<Integer> list  = Arrays.asList(1,2,3,4,5);
        /**
         * java.util.Arrays.ArrayList
         * java.lang.UnsupportedOperationException
         * 	at java.util.AbstractList.add(AbstractList.java:148)
         */
      list.add(6);
      list.forEach(System.out::println);
    }
}
